<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>classinfo</title>
</head>
<body>
    <h2>班级信息</h2>
    <table border="1">
        <tr>
            <td>班级编号</td>
            <td th:text="${classinfo.classno}"></td>
        </tr>
        <tr>
            <td>班级名称</td>
            <td th:text="${classinfo.classname}"></td>
        </tr>
    </table>
    <h2>该班级有下列学生</h2>
    <table border="1">
        <tr>
            <th>学号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>年龄</th>
        </tr>
        <tr th:each="s:${classinfo.students}">
            <td th:text="${s.id}"></td>
            <td th:text="${s.studentname}"></td>
            <td th:text="${s.gender}"></td>
            <td th:text="${s.age}"></td>
        </tr>
    </table>
</body>
</html>